package com.ruoyi.lhky.controller;

import com.ruoyi.lhky.pojo.V1;
import com.ruoyi.lhky.service.V1Service;
import com.ruoyi.lhky.util.R;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.responses.ApiResponse;
import io.swagger.v3.oas.annotations.responses.ApiResponses;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/api/v1")
@Tag(name = "V1管理", description = "V1表的相关操作")
public class V1Controller {

    @Autowired
    private V1Service v1Service;

    @PostMapping("/add")
    @Operation(summary = "新增V1记录", description = "新增V1记录")
    @ApiResponses({
            @ApiResponse(responseCode = "200", description = "新增成功"),
            @ApiResponse(responseCode = "400", description = "请求参数错误"),
            @ApiResponse(responseCode = "500", description = "服务器内部错误")
    })
    public R addV1(@RequestBody V1 v1) {
        return v1Service.addV1(v1);
    }
}
